package com.alibaba.Day05;

public class Card {

    private String name;

    private int number;

    private int balance;

    public Card(String name, int number, int balance) {
        this.name = name;
        this.number = number;
        this.balance = balance;
    }

    public Card() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public int getBalance() {
        return balance;
    }

    public void setBalance(int balance) {
        this.balance = balance;
    }


    //取款的方法
    public void  withDraw(int money){
        System.out.println(this.name + "正在取款");
        this.balance = this.balance - money;
    }

    //存款的方法
    public void getDraw(int money){
        System.out.println(this.name + " 正在存款厊");
        this.balance = this.balance + money;
    }

    //查询余额的方法
    public void selectDraw(){
        System.out.println(this.name + "还有" + this.balance + "的余额哦");
    }


}
